package com.shangxia.basic.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shangxia.basic.common.mybatis.dynamicsource.DataSourceType;
import com.shangxia.basic.common.mybatis.dynamicsource.ResourceTypeEnum;
import com.shangxia.basic.dao.UserDao;
import com.shangxia.basic.entity.User;
import com.shangxia.basic.service.UserService;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;

import javax.annotation.Resource;

/**
 * (User)表服务实现类
 *
 * @author makejava
 * @since 2020-06-07 12:25:24
 */
@Service("userService")
@Slf4j
public class UserServiceImpl extends ServiceImpl<UserDao, User> implements UserService {

    @Resource
    private UserDao userDao;

    @Override
    @DataSourceType(ResourceTypeEnum.ORANGE)
    public Object getByUserCode(String userCode) {
        return userDao.getByUserCode(userCode);
    }
}